<template>
    <div style="display: flex; flex-direction: column; align-items: center">
        <img src="@/views/activityPages/assets/order-success.png" style="width: 132px; height: 132px" />
        <text class="successText">预约成功</text>
        <div class="cardShadow">
            <div>
                <text class="titleText"
                    >商业的 [乌卡时代]，我们如何重塑商业价值- WAWARDS金网奖2023年商业计划领航秀峰会
                </text>
            </div>
            <text class="moneyText">100</text>
            <div>
                <div>
                    <text class="subText">活动时间：{{ '暗杀计划的看哈空间数据库的黑科技' }}</text>
                </div>
                <div>
                    <text class="subText">活动地点：{{ '暗杀计划的看哈空间数据库的黑科技' }}</text>
                </div>
            </div>
        </div>
    </div>
    <div
        class="bottom"
        style="display: flex; flex-direction: row; justify-content: center; padding-bottom: 20px"
    >
        <div class="greenButton" @click="toDetail">查看订单</div>
    </div>
</template>

<script setup>
import request from '@/utils/request'
import { defineComponent, reactive, ref, defineProps, getCurrentInstance } from 'vue'
import { onLaunch, onShow, onHide, onLoad } from '@dcloudio/uni-app'

import { useStore } from 'vuex'
import CountButtons from '@/components/activity/count-buttons.vue'

const buyCount = ref(0)
const amount = ref(100)
let params = {}
onLoad((e) => {
    console.log('fill order params=', e)
    params = e
    buyCount.value = Number.parseInt(params.count, 10)
})
function onCountChange(i) {
    buyCount.value = i
    // console.log('buyCount=', buyCount.value)
}
function onConfirm() {
    uni.navigateTo({
        url: ''
    })
}
function toDetail() {
    uni.navigateTo({
        url: `/views/activityPages/order/order-detail?id=${params.id}`
    })
    // uni.navigateTo({
    //     url: `/views/activityPages/order/unpaid-order-detail?id=${params.id}`
    // })
    // uni.navigateTo({
    //     url: `/views/activityPages/order/canceled-order-detail?id=${params.id}`
    // })
}
</script>

<style lang="scss" scoped>
.greenButton {
    width: 271px;
    height: 40px;
    line-height: 20px;
    border-radius: 4px;
    background-color: rgba(90, 187, 105, 1);
    color: rgba(255, 255, 255, 1);
    font-size: 14px;
    text-align: center;
    font-family: Microsoft Yahei;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.cardShadow {
    padding: 10px;

    margin: 17px;
    line-height: 20px;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 1);
    color: rgba(16, 16, 16, 1);
    font-size: 14px;
    // text-align: center;
    box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
    font-family: Roboto;
}
.successText {
    line-height: 28px;
    color: rgba(16, 16, 16, 1);
    font-size: 20px;
    text-align: left;
    font-family: PingFangSC-regular;
    font-weight: bold;
}
.input {
    border: none;
}
.button {
    width: 116px;
    height: 35px;
    line-height: 20px;
    border-radius: 20px;
    background-color: rgba(236, 106, 45, 1);
    color: rgba(255, 255, 255, 1);
    font-size: 14px;
    text-align: center;
    font-family: Microsoft Yahei;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.inputTitle {
    width: 70px;
    text-align: end;
}
.card {
    line-height: 20px;
    border-radius: 10px;
    background-color: white;
    color: rgba(16, 16, 16, 1);
    font-size: 14px;
    text-align: left;
    font-family: Roboto;
    padding: 10px;
    align-items: flex-start;

    display: flex;
    flex-direction: column;
}
.titleText {
    line-height: 17px;
    color: rgba(16, 16, 16, 1);
    font-size: 12px;
    text-align: left;
    font-family: PingFangSC-regular;
    font-weight: bold;
}
.subText {
    color: rgba(153, 153, 153, 1);
    font-size: 10px;
    text-align: left;
    font-family: PingFangSC-regular;
}
.row {
    display: flex;
    flex-direction: row;
}
.moneyText {
    color: rgba(50, 140, 0, 1);
    font-size: 20px;
    text-align: left;
    font-family: PingFangSC-regular;
}
.divider {
    width: 999px;
    height: 2px;
    background-color: #f5f5f5;
    // border: 1px solid rgba(245, 245, 245, 1);
}
.bottom {
    position: fixed;
    bottom: calc(var(--window-bottom));
    z-index: 1030;
    margin-bottom: 0px;
    width: 100%;
}
</style>
